package com.micro.boot.common.dialect;

public class MySQLDialect extends Dialect {

	@Override
	public String getLimitString(String sql, int offset, int limit) {
		sql = sql.trim();    
		StringBuffer pagingSelect = new StringBuffer(sql.length() + 25);    
		pagingSelect.append(sql);    
		String page = offset > 0 ? " limit " + (offset-1) * limit + ", " + limit : " limit " + limit;
		pagingSelect.append(page);
		return pagingSelect.toString();
	}

}
